home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Selection / Multimedia Selection Volume One - CD-ROM / MULTIMEDIA SELECTION____________.ISO / programz / tsrlib / tsrlib.doc < prev    next >
Encoding:
Text File  |  1991-11-30  |  2.8 KB  |  65 lines

  1.     The term TSR comes from the  DOS function Terminate and Stay Resident.
  2.     Normally, when a program terminates, DOS  closes any files the program
  3.     has opened, releases all memory that  was allocated to it, and returns
  4.     control to the parent program  -  usually COMMAND.COM, which will then
  5.     give you a DOS command line.
  6.     
  7.     But, when DOS was designed,  it's  authors had already anticipated the
  8.     need to  add  extensions  and  provided  hooks  for  attaching  system
  9.     enhancements. The primary hook  was  a  function  you  could call that
  10.     would return you to the calling program (normally COMMAND.COM), whilst
  11.     leaving your program intact - with  all its memory available and files
  12.     left open.
  13.     
  14.     Programmers soon learned that this function  could  be used to leave a
  15.     program resident in such a way  that  it  could  be woken to perform a
  16.     task at a later time.  The  first  programmers  to  do this worked for
  17.     Microsoft, and the  first  TSR  was  probably  the  PRINT utility that
  18.     appeared from DOS 2.0 onwards.
  19.     
  20.     Unfortunately, although they provided mechanisms to support TSRs as we
  21.     understand them today, they were  undocumented  and  it  took a lot of
  22.     patient work by dedicated programmers  to unfathom their workings. But
  23.     nowadays all  well-written  commercial  TSRs  use  them,  and  I would
  24.     venture to say that you'll be able  to rely on them continuing to work
  25.     in future versions of DOS,  as  Microsoft  is  highly unlikely to make
  26.     changes that would prevent  programs  such  as Borland's Sidekick from
  27.     working.
  28.     
  29.     To help you make use of these  features in creating your own TSRs here
  30.     is a comprehensive Turbo C library  that  you can link into your code,
  31.     along with some example TSRs.
  32.     
  33.     Once you have installed the libraries on a hard disk or another floppy
  34.     you will need to do one  of  the  following from the DOS command line,
  35.     depending on which version of Turbo C you are using:
  36.     
  37.  
  38.                                  INSTALLATION
  39.                                  ------------    
  40.  
  41.     TURBO C v2.00   You must rename MAKEFILE.C20 as MAKEFILE like this:
  42.     
  43.                             RENAME MAKEFILE.C20 MAKEFILE
  44.     
  45.                     then type:
  46.     
  47.                             MAKE
  48.     
  49.                     The library you will be using is called TSR20.LIB.
  50.     
  51.     
  52.     TURBO C ++      You must rename MAKEFILE.CPP as MAKEFILE like this:
  53.     
  54.                             RENAME MAKEFILE.CPP MAKEFILE
  55.     
  56.                     then type:
  57.     
  58.                             MAKE
  59.     
  60.                     The library you will be using is called TSRPP.LIB.
  61.     
  62.     
  63.     For full details on how to  use  the  TSR  library please refer to the
  64.     article inside the magazine.
  65.